/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.click.app.service.impl;

import com.click.app.dao.OptionDao;
import com.click.app.model.Option;
import com.click.app.service.OptionManager;
import java.util.List;
import javax.jws.WebService;

/**
 *
 * @author israel
 */

public class OptionManagerImpl extends GenericManagerImpl<Option, Long> implements OptionManager{
    private OptionDao dao;

    public OptionManagerImpl(OptionDao dao) {
        super(dao);
        this.dao = dao;
    }

    public void setOptionDao(OptionDao dao) {
        this.dao = dao;
    }

    /**
     * {@inheritDoc}
     */
    public List<Option> getOptions() {
        return dao.getAll();
    }

    /**
     * {@inheritDoc}
     */
    public Option getOption(String optionName) {
        return dao.getOptionByName(optionName);
    }

    /**
     * {@inheritDoc}
     */
    public Option saveOption(Option option) {
        return dao.save(option);
    }

    /**
     * {@inheritDoc}
     */
    public void removeOption(String optionName) {
        dao.removeOption(optionName);
    }
}
